package com.jkm.boss.dao;
import com.jkm.boss.helper.request.QuerySupportBankParams;
import com.jkm.boss.entity.ChannelSupportCreditBank;
import com.jkm.rwseparate.DataSource;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by shitou on 17/4/14.
 */
@Repository
public interface ChannelSupportCreditBankDao {
    /**
     * 列表-个数
     *
     * @param querySupportBankParams
     * @return
     */
    @DataSource("read")
    int selectCountByParam(QuerySupportBankParams querySupportBankParams);

    /**
     * 列表-集合
     *
     * @param querySupportBankParams
     * @return
     */
    @DataSource("read")
    List<ChannelSupportCreditBank> selectByParam(QuerySupportBankParams querySupportBankParams);

    /**
     * 按id查询
     *
     * @param id
     * @return
     */
    @DataSource("read")
    ChannelSupportCreditBank selectById(@Param("id") long id);

    /**
     * 更新状态
     *
     * @param id
     * @param status
     * @return
     */
    @DataSource("default")
    int updateStatus(@Param("id") long id, @Param("status") int status);

}
